package com.ybkj.daijia.server.service;

import com.ybkj.daijia.page.Page;
import com.ybkj.daijia.server.model.Notice;
import com.ybkj.daijia.server.model.NoticeXDriver;
import java.math.BigDecimal;
import java.util.Map;

/**
 * @author Shine
 */
public interface NoticeService {

    /**
     * @param driverid
     * @param end
     * @param start
     * @param name
     * @return name为null则查询出所有的信息，否则只查询出与name匹配的信息
     */
    public Page<Notice> queryAll();

    /**
     * @param admin
     * @return
     */
    public Notice save(Notice notice);

    public void update(Notice notice);

    /**
     * 查询一条通知信息
     *
     * @param id
     * @return
     */
    public Notice findOne(Long id);

    public void delete(Notice notice);

    public void create(String content, String contentMore, String name, String phone,
        String username,
        BigDecimal virtual, String startTime, String endTime,
        Long[] companyId, Integer[] status, Boolean freeze, String[] type,
        String[] jobType, String sendTypes);

    public Page<Map<String, Object>> queryNoticeV3(Long driverId, Integer page, Integer limit);

    public NoticeXDriver findByDriverAndNotice(Long driverId, Long noticeId);

    public void updateHasRead(Long id);

    public Long countNotRead(Long driverId);

    public void readAllNotice(Long driverId);

}
